﻿<UserControl x:Class="wathammer40kListBuilder.View.AdminArmy"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:loc="clr-namespace:wathammer40kListBuilder.ViewModel"
             xmlns:model="clr-namespace:wh40klbModel;assembly=wh40klbModel"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <DataTemplate DataType="{x:Type model:Infantry}">
            <Grid Margin="0,2,0,2" Background="Khaki">
                <StackPanel>
                    <Grid MinHeight="10" Background="BlanchedAlmond">
                        <Label Content="{Binding Name}" />
                    </Grid>
                    <Grid >
                        <StackPanel>
                            <Label Content="Pokemon" />
                            <Label Content="Pokemon" />
                            <Label Content="Pokemon" />
                            <Label Content="Pokemon" />
                            <Label Content="Pokemon" />
                        </StackPanel>
                    </Grid>
                </StackPanel>
            </Grid>
        </DataTemplate>
    </UserControl.Resources>
    <Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Label Content="Armée :" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Right" Margin="2"/>
            <Label Content="Unitées :" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right" Margin="2"/>
            <Label Content="Véhicules :" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Right" Margin="2"/>
            <ComboBox Grid.Column="1" Grid.Row="0" Width="80" Margin="2" ItemsSource="{Binding Armies}" DisplayMemberPath="Name" SelectionChanged="ComboBox_SelectionChanged">
            </ComboBox>
            <ScrollViewer Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3" Margin="2" BorderThickness="1" HorizontalAlignment="Stretch">
                <ItemsControl ItemsSource="{Binding Infantries}"  HorizontalContentAlignment="Stretch"/>
            </ScrollViewer>
            <ScrollViewer Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3" Margin="2" >
                <ItemsControl ItemsSource="{Binding Vehicules}"  HorizontalContentAlignment="Stretch"  />
            </ScrollViewer>
            <StackPanel Grid.Column="3" Grid.Row="2">
                <Grid Name="PanelInfantry" />
                <Button Content="Ajout" Padding="2" Margin="2" Name="AddInfantryButton" Click="AddInfantryButton_Click" />
                <Button Content="Supprimer" Padding="2" Margin="2" Name="DeleteInfantryButton" Click="DeleteInfantryButton_Click" />
                <Button Content="Modifier" Padding="2" Margin="2" Name="UpdateInfantryButton" />
            </StackPanel>
            <StackPanel Grid.Column="3" Grid.Row="4">
                <Grid Name="PanelVehicule" />
                <Button Content="Ajout" Padding="2" Margin="2" />
                <Button Content="Supprimer" Padding="2" Margin="2" />
                <Button Content="Modifier" Padding="2" Margin="2" />
            </StackPanel>
        </Grid>

    </Grid>
</UserControl>
